<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改信用评价任务计划')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-task-edit" th:object="${evaTask}">
            <input name="taskId" th:field="*{taskId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">任务名称：</label>
                <div class="col-sm-8">
                    <input name="taskName" th:field="*{taskName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">合同收支类别：</label>
                <div class="col-sm-8">
                    <select name="contractClass" class="form-control m-b" th:with="type=${@dict.getType('contract_class')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{contractClass}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">合同类型：</label>
                <div class="col-sm-8">
                    <select name="contractType" class="form-control m-b" th:with="type=${@dict.getType('contract_type')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{contractType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-8">
                    <select name="status" class="form-control m-b" th:with="type=${@dict.getType('task_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">年份：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="taskYear" th:field="*{taskYear}" class="form-control" placeholder="yyyy" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">发起部门id：</label>
                <div class="col-sm-8">
                    <input name="createDeptId" th:field="*{createDeptId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">更新部门id：</label>
                <div class="col-sm-8">
                    <input name="updateDeptId" th:field="*{updateDeptId}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "credit/task";
        $("#form-task-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-task-edit').serialize());
            }
        }

        $("input[name='taskYear']").datetimepicker({
            language:'zh-cn',
            format: 'yyyy',
            autoclose: true,
            todayBtn: false,
            todayHighlight: true,
            startView: 'decade',
            minView:'decade',
            maxView:'decade',
        });
    </script>
</body>
</html>
